Skip to content

fix(spec): support deflate for Avro manifest files - #842

Closed
jackylee-ch wants to merge 1 commit into
apache:mainfrom
jackylee-ch:fix/avro-deflate-codec
Closed

jackylee-ch wants to merge 1 commit into
apache:mainfrom
jackylee-ch:fix/avro-deflate-codec

Conversation

@jackylee-ch

Copy link
Copy Markdown
Contributor

avro_codec rejected deflate and the OCF reader's codec whitelist did too, so a
table whose schema carries manifest.compression=deflate could be neither
written nor read: every scan failed with avro ocf: unsupported codec: deflate.
The option comes from the persisted schema, so a table created by Java brings it
along to every paimon-rust process. Java accepts deflate through
CodecFactory.fromString.

Read support is a regression: 553e4a3 (#281) advertised "snappy/deflate/zstd"
in its own message while shipping only three arms, replacing a reader that did
handle deflate. Write support is parity work. At HEAD the crate already reads
deflate-compressed Avro data files, so only manifests were refused.

No upstream report; found by inspection. bzip2 and xz are the same gap and
stay rejected. Drive-by: the snappy mismatch message said CRC32C where the code
computes CRC-32.

@JingsongLi JingsongLi left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Requirement fit: SUPPORTED. Implementation: CLEAN.

A Java-created table can persist manifest.compression=deflate, so read and write support is needed for cross-engine operation. The raw RFC 1951 decoder is scoped to the Avro OCF codec, preserves rejection of unsupported codecs, and the writer/reader codec sets remain compatible. I found no regression in the changed paths. Verification: cargo test -p paimon --lib test_deflate_manifest_compression_round_trips (passed). Review scope: OCF framing, strict decode failure, manifest-list and manifest commit/read-back.

@JingsongLi JingsongLi left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

-1 No need to do this. No use case.

@JingsongLi JingsongLi closed this Sep 17, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants